<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>陆道原乡产品报价管理系统</title>
    <link rel="stylesheet" href="__STATIC__/layui/css/layui.css">
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
    <div class="layui-header">
        <div class="layui-logo">陆道原乡后台系统</div>

        <ul class="layui-nav layui-layout-right ">
            <li class="layui-nav-item">
                <a href="javascript:;">
                    欢迎{$name}
                </a>
                <dl class="layui-nav-child">
                    <dd><a href="#" id="updatePass">修改密码</a></dd>
                    <dd><a href="{:url('Login/logout')}">退出</a></dd>
                </dl>
            </li>
        </ul>
    </div>

    <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll">
            <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
            <ul class="layui-nav layui-nav-tree" lay-filter="test">
                <li class="layui-nav-item">
                    <a  href="javascript:;">
                        <i class="layui-icon" style="font-size: 18px;">&#xe7a0;</i>&nbsp;首页
                    </a>
                </li>
                <li class="layui-nav-item">
                    <a class="my-link" data-href="{:url('User/index')}" href="javascript:;">
                        <i class="layui-icon" style="font-size: 16px;">&#xe612;</i>&nbsp;用户管理
                    </a>
                </li>
                <!--{/if}-->
            </ul>
        </div>
    </div>

    <div class="layui-body">
        <!-- 内容主体区域 -->
        <div style="padding: 5px;height: 98%;width: 100%;" id="showBox">
            <iframe scrolling="on" height="100%" width="100%" frameborder="0"
                    src="{:url('Home/index')}"></iframe>
        </div>
    </div>

    <div class="layui-footer footer">
        <div class="layui-main">
            <p style="text-align:center">© 2018 陆道原乡</p>
        </div>
    </div>
</div>
<script src="__STATIC__/layui/layui.js"></script>
<script>
    //JavaScript代码区域
    layui.config({base: '__STATIC__/layui/plugins/'}).use(['element', 'layer'], function () {
        var $ = layui.jquery;
        var layer = layui.layer;
        $(".my-link").on("click", function () {
            var index = layer.load(3, {
                shade: [0.1, '#fff']
            });
            var href = $(this).attr('data-href');
            $('#showBox').empty().append('<iframe height="100%" width="100%" frameborder="0" src="' + href + '"></iframe>');
            $('#showBox').find('iframe').load(function () {
//                this.height = window.screen.availHeight-180;
                layer.close(index);
            });
        });
        $('#updatePass').on('click', function () {
            layer.open({
                type: 2,
                title: '修改密码',
                area: ['500px', '400px'],
                content: "{:url('User/update')}"
            });
        });
    });
</script>
</body>
</html>